class Person {
    constructor (name) {
        console.log(name)
        this.name = name
    }
    say () {
        console.log(`My name is ${this.name}`)
    }
}

class Child extends Person {
    constructor (name, age) {
        super(name)
        this.age = age
    }
    play () {
        console.log('I\'m playing games')
    }
}
let Tom = new Child('Tom', 12)
let Jack = new Child('Jack', 11)
Tom.play()
Tom.say()